package com.dengcj.epl.entity;

import cn.hutool.setting.Setting;

/**
 * @author dengchunjie
 * @Description: 企业微信相关配置
 * @date 2022/1/19 17:20
 */
public class WorkWx {

    // 企业微信ID
    private static String corpId;

    // 消息应用AgentId
    private static String agentId;

    // 消息应用Secret
    private static String secret;

    public static String getCorpId() {
        return corpId;
    }

    public static String getAgentId() {
        return agentId;
    }

    public static String getSecret() {
        return secret;
    }

    public static void init(){
        // 从配置文件读取
        Setting setting = new Setting("workwx.setting");
        corpId = setting.get("CorpId");
        agentId = setting.get("MessageAppAgentId");
        secret = setting.get("MessageAppSecret");
    }
}
